package com.cloudpivot.receivales.ding.scenegroup.view;

import lombok.Getter;
import lombok.Setter;

/**
 * 返回 请求的说明
 */
public enum RspEnum {

    ONE(-100, "转换钉钉userid异常"),
    TWO(-10000, "controller catch报错"),
    ThREE(-99, "创建场景群失败"),
    FORE(-101,"CrmTask记录异常(可能没有，可能已经创建过)"),
    FIVE(1,"创建场景群成功"),
    SIX(-102,"创建互动卡片失败"),
    SEVEN(-201, "延时创建卡片异常"),
    EIGHT(10,"url卡片创建成功"),
    NINE(11,"生日卡片创建成功"),

    TEN(-102, "推送酷应用信息,入参不正确"),

    ELEVEN(2, "推送酷应用信息正常"),
    ;

    @Getter
    @Setter
    private Integer k;
    @Getter
    @Setter
    private String v;

    RspEnum(Integer k, String v) {
        this.k = k;
        this.v = v;
    }

    /**
     * 根据k获取comment
     *
     * @param k
     * @return comment
     */
    public static String getValue(Integer k) {
        if (k==null) {
            return "转换异常";
        }
        for (RspEnum eNum : RspEnum.values()) {
            if (eNum.getK().equals(k)) {
                return eNum.getV();
            }
        }
        return "转换异常";
    }
}
